using System;
using System.Collections.Generic;
using UnityEngine;

namespace Features
{
    [CreateAssetMenu(fileName = "AntiInjury", menuName = "Features/反伤", order = 1)]
    public class AntiInjury : Feature
    {
        public float Damage;

        public override void CancleEffect(FeatureEventArgs args)
        {

        }

        public override void ExecuteEffect(FeatureEventArgs args)
        {
            // 后面要加一个距离判断
            if (args.Attacker != null)
                args.Attacker.BeHit(Damage, null);
            // SpriteTextManager.NewEffectText("反伤", args.pawn.transform.position.x, args.pawn.transform.position.y, Color.red);
        }

        public override string GetDescription()
        {
            return "反伤" + Damage;
        }
    }
}